#include <assert.h>
#include "helloworldao_factory.h"
#include "helloworldao_stub4web.h"
#include "helloworldao_stub4app.h"
//#include "helloworldao.h"

using namespace com::erp::test::ao;

bool CHelloworldAoFactory::s_HelloworldAoInit = false;

IHelloworldAo* CHelloworldAoFactory::GetObject(enum ObjType_T obj_type)
{
    switch(obj_type)
    {
    case STUB4APP:
        return (new CHelloworldAoStub4App);
/*适应container3
    case POCO:
    {
        if(!s_HelloworldAoInit)
        {
            int iRetCode = CHelloworldAo::Initialize();
            assert(iRetCode == 0);
            s_HelloworldAoInit = true;
        }   	
        return (new CHelloworldAo);
	}*/
    default:
        assert(0);
    };
    return NULL;
}

IHelloworldAoAsyc* CHelloworldAoFactory::GetAsycObject()
{
	return (new CHelloworldAoStub4App);
}
